import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import Vue from "vue";
import VueRouter from "vue-router";
import App from "./App.vue";
import routes from "./router";
import store from "./store";
import microAppStart from "./micro-app";

Vue.config.productionTip = false;

Vue.use(ElementUI);

const router = new VueRouter({
  base: "/",
  mode: "history",
  routes,
});

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");

// # 启动微应用
const appsPromse = microAppStart();
// # 生成菜单数据
store.dispatch("generateMenuData", { appsPromse, routes });
